home *** CD-ROM | disk | FTP | other *** search
/ Internet Info 1994 March / Internet Info CD-ROM (Walnut Creek) (March 1994).iso / inet / internet-drafts / draft-ietf-tn3270e-current-pract-02.txt < prev    next >
Text File  |  1993-10-18  |  23KB  |  581 lines

  1. TN3270 Enhancements Working Group                           Jon Penner
  2. draft-ietf-tn3270e-current-pract-02.txt                   October 1993
  3.  
  4.                         TN3270 Current Practices
  5.  
  6.  
  7. Status of this Memo
  8.  
  9.    This document is an Internet Draft.  Internet Drafts are working
  10.    documents of the Internet Engineering Task Force (IETF), its Areas,
  11.    and its Working Groups.  Note that other groups may also distribute
  12.    working documents as Internet Drafts.
  13.  
  14.    Internet Drafts are draft documents valid for a maximum of six
  15.    months.  Internet Drafts may be updated, replaced, or obsoleted by
  16.    other documents at any time.  It is not appropriate to use Internet
  17.    Drafts as reference material or to cite them other than as a
  18.    "working draft" or "work in progress."
  19.  
  20.    Please check the 1id-abstracts.txt listing contained in the
  21.    internet-drafts Shadow Directories on ds.internic.net,
  22.    nic.nordu.net, ftp.nisc.sri.com, or munnari.oz.au to learn the
  23.    current status of any Internet Draft.
  24.  
  25. Abstract
  26.  
  27.    This document describes the existing implementation of transferring
  28.    3270 display terminal data using currently available telnet
  29.    capabilities.   The name traditionally associated with this
  30.    implementation is TN3270.
  31.  
  32.    Information is provided to aid in the implementation of TN3270
  33.    servers as well as client terminal emulators.
  34.  
  35.    The following areas pertaining to TN3270 implementations are
  36.    covered in this document:
  37.  
  38.    1. the telnet options negotiated to transition from a NVT ASCII
  39.    state to a TN3270 state ready to process incoming 3270 data stream
  40.    commands
  41.  
  42.    2. the method for sending and receiving 3270 data
  43.  
  44.    3. the method of handling some special keys known as SYSREQ and
  45.    ATTN using current available telnet commands
  46.  
  47.    4. the events that will transition a TN3270 session back to an NVT
  48.    session
  49.  
  50.  
  51. Motivation
  52.  
  53.    3270 display terminal data differs from traditional display terminal
  54.    data in that it is block mode and uses EBCDIC instead of ASCII
  55.    character representation. These two differences are the primary
  56.  
  57. J. Penner                Expires April 1994                   [Page 1]
  58.  
  59. TN3270 Enhancements Working Group                           Jon Penner
  60. draft-ietf-tn3270e-current-pract-02.txt                   October 1993
  61.  
  62.    reason for the differentiation of TN3270 from standard Telnet in
  63.    this document.
  64.  
  65.  
  66. Background
  67.  
  68.    Existing proprietary IBM networks are not easily integrated with
  69.    the increasing number of multi-platform networking environments,
  70.    specifically TCP/IP. These proprietary IBM networks are referred to
  71.    as SNA (Systems Network Architecture) in this document. To address
  72.    this issue, several vendors have introduced telnet servers that
  73.    provide a TCP/IP users a connection to existing IBM mainframes by
  74.    supporting display terminal emulation using a subset of the existing
  75.    telnet protocol. Some vendors now offer host based tn3270 support
  76.    over TCP/IP.
  77.  
  78.    IBM terminals are generically referred to as 3270's which
  79.    includes a broad range of terminals and devices, not all of which
  80.    actually begin with the numbers 327x.
  81.  
  82.    3270 terminals in the IBM SNA network environment have 2 parallel
  83.    sessions with the host computer. One is used for communicating with
  84.    the host application, the other is used for communicating with the
  85.    network control program that links the terminal with the
  86.    appropriate host computer.  For the purposes of TN3270, this
  87.    distinction is not apparent or relevant since there is actually
  88.    only a single telnet session with the host computer or server.  On
  89.    an IBM SNA network, the 3270 terminal has a special key that toggles
  90.    between the two sessions (SYSREQ).  A brief discussion on how
  91.    some telnet servers deal with this is included.
  92.  
  93.    In an SNA environment, a client session is identified by a Logical
  94.    Unit (LU) name.  In a non-SNA environment, there is not a LU name
  95.    associated with a client session.  The closest thing to a LU name
  96.    in the TN3270 environment is the client's IP address.  Although some
  97.    telnet servers are connected to the host using SNA, tn3270 clients
  98.    using these servers have no defined way to determine the LU name
  99.    associated with the session.
  100.  
  101.    Currently, support for 3270 terminal emulation over Telnet is
  102.    accomplished by the de facto standard of negotiating three separate
  103.    Telnet Options - Terminal-Type [2], Binary Transmission [3], and
  104.    End of Record [4].  This negotiation and the resulting data flow will
  105.    be described below.
  106.  
  107.    RFC 1041 [1] attempted to standardize the method of negotiating
  108.    3270 terminal support by defining the 3270 Regime Telnet Option.
  109.    Historically, very few developers and vendors ever implemented
  110.    RFC 1041.
  111.  
  112.    All references in this document to the 3270 datastream, SNA versus
  113.    non-SNA operation, 3270 datastream commands, orders, structured
  114.  
  115. J. Penner                Expires April 1994                   [Page 2]
  116.  
  117. TN3270 Enhancements Working Group                           Jon Penner
  118. draft-ietf-tn3270e-current-pract-02.txt                   October 1993
  119.  
  120.    fields and the like rely on [6].
  121.  
  122.    References to SNA Request and Response Units rely on [7].
  123.  
  124.    TN3270 does not support typical SNA responses and is classified as a
  125.    non-SNA protocol.  A TN3270 emulator is not aware or concerned about
  126.    how the telnet server is connected to a 3270 host application.
  127.    Current telnet server implementations are either 3270 host based or
  128.    connected to the host using the SNA protocol.
  129.  
  130.    NOTE: Except where otherwise stated, this document does not
  131.    distinguish between telnet servers that represent SNA devices and
  132.    those that represent non-SNA 3270 devices.
  133.  
  134.    Some typical "SNA" functions such as the SYSREQ
  135.    and ATTN keys have been mapped to existing telnet function codes
  136.    and are supported by some telnet server implementations.
  137.  
  138.    There are several shortcomings in current tn3270 implementations;
  139.    among them are the following:
  140.  
  141.     - It provides no capability for Telnet clients to emulate the 328x
  142.       class of printers.
  143.  
  144.     - There is no mechanism by which a Telnet client can request that
  145.       a connection be associated with a given 3270 device-name.  This
  146.       can be of importance when a terminal session is being
  147.       established, since many host applications behave differently
  148.       depending on the network name of the terminal.  In the case of
  149.       printer emulation, this capability is an absolute necessity
  150.       because a large number of host applications have some method of
  151.       pre-defining printer destinations.
  152.  
  153.     - The 3270 ATTN and SYSREQ keys are not universally supported.
  154.  
  155.     - There is no support for the SNA positive/negative response
  156.       process. All data that is sent is assumed to either be handled
  157.       or ignored.
  158.       A negative response indicates some sort of error at the client
  159.       while processing the previously received data; this could be
  160.       caused by the host application building a 3270 datastream that
  161.       contains an invalid command, or by a mechanical error at the
  162.       client side, among other things.
  163.       Positive responses indicate processing of the previously received
  164.       data has completed.
  165.  
  166.     - There is no mechanism by which the client can access the SNA
  167.       BIND information.  The BIND image in a SNA environment
  168.       contains a detailed description of the session between the
  169.       telnet server and the host application.
  170.  
  171.     - The connection negotiation does not make it clear whether clients
  172.  
  173. J. Penner                Expires April 1994                   [Page 3]
  174.  
  175. TN3270 Enhancements Working Group                           Jon Penner
  176. draft-ietf-tn3270e-current-pract-02.txt                   October 1993
  177.  
  178.       should support 3270 structured fields.
  179.  
  180.  
  181. Command Names and Codes
  182.  
  183.    TN3270 makes use of existing Telnet commands and codes and does
  184.    not define any new commands or options.
  185.  
  186.        BINARY            0
  187.        TERMINAL-TYPE    24
  188.        EOR              25
  189.  
  190.    Additional commands may be used during a TN3270 session and are
  191.    interpreted as per their respective RFCs. Examples of this are
  192.    [1] 3270-REGIME, [8] SUPPRESS-GO-AHEAD, [9] ECHO
  193.    and [10] TIMING-MARK.  Some commands do not have their own
  194.    RFC and are described in RFC 854 [11]; these include NOP, BREAK
  195.    and Interrupt Process.
  196.  
  197.  
  198. Command Meanings
  199.  
  200.    See respective RFCs.
  201.  
  202.  
  203. Connection Negotiation
  204.  
  205.    The following example shows a TN3270-capable server and a
  206.    tn3270 client establishing a connection:
  207.  
  208.  
  209.    The TCP/IP port generally used to connect with is 23 (Telnet).
  210.  
  211.    At any place before and during the tn3270 connection negotiation
  212.    process, other telnet commands and data may be transferred and
  213.    will be interpreted under the existing telnet state. Some existing
  214.    tn3270 servers start a client connection using an NVT telnet
  215.    dialog to establish parameters needed to complete the tn3270
  216.    connection to the desired host.
  217.  
  218.    The order of negotiating terminal type, EOR and BINARY is not
  219.    significant, this example shows a typical tn3270 connection.
  220.  
  221.       Server:  IAC DO TERMINAL-TYPE
  222.  
  223.       Client:  IAC WILL TERMINAL-TYPE
  224.  
  225.       Server:  IAC SB TERMINAL-TYPE SEND IAC SE
  226.  
  227.       Client:  IAC SB TERMINAL-TYPE IS <terminal type>IAC SE
  228.  
  229.        where <terminal type> is a string consisting of terminal model,
  230.  
  231. J. Penner                Expires April 1994                   [Page 4]
  232.  
  233. TN3270 Enhancements Working Group                           Jon Penner
  234. draft-ietf-tn3270e-current-pract-02.txt                   October 1993
  235.  
  236.      type and support of enhanced attribute bytes; and example is
  237.      IBM-3278-2.  The acceptable values are listed in RFC 1340,
  238.      Assigned Numbers [5].  Other values are in use that do not exist
  239.      in [5].
  240.    
  241.      The -2 following 3278 designates the alternate screen size.
  242.      3270 terminals have the ability to switch between the
  243.      standard (24x80) screen size and an alternate screen size.
  244.      Model -2 is 24x80 which is the same as the standard size.
  245.      Model -3 is 32x80, model -4 is 43x80 and model -5 is 27x132.
  246.  
  247.      Appending the two character string "-E" to the end of the
  248.      terminal type signifies that the terminal is capable of handling
  249.      3270 extended data stream. This is interpreted to mean that the
  250.      terminal is able to handle structured fields, which are
  251.      described below.  Some telnet server implementations also
  252.      interpret this to mean that the terminal is capable of handling
  253.      extended attributes (highlighting, field validation, character
  254.      set, outlining, etc.) [6].
  255.  
  256.      The 3279 series of terminals is capable of extended attributes
  257.      while the 3278 series is not.
  258.  
  259.       Server:  IAC DO EOR IAC WILL EOR
  260.       Client:  IAC WILL EOR IAC DO EOR
  261.       Server:  IAC DO BINARY IAC WILL BINARY
  262.       Client:  IAC WILL BINARY IAC DO BINARY
  263.       Server:  <3270 data stream> IAC EOR
  264.       Client:  <3270 data stream> IAC EOR
  265.            .            .
  266.            .            .
  267.  
  268.    To terminate the connection the socket is closed by one of
  269.    the session partners. Typically, when the user logs off of the
  270.    host, the telnet server closes the connection.
  271.  
  272.    If the telnet server wishes to go back to NVT mode, it may issue
  273.    the following commands:
  274.  
  275.        Server:  IAC WONT BINARY
  276.        Client:  IAC DONT BINARY
  277.  
  278.            or
  279.  
  280.        Server:  IAC WONT EOR
  281.        Client:  IAC DONT EOR
  282.  
  283.    Either one of the above two cases causes the connection to not
  284.    satisfy the requirements for a valid TN3270 session. The telnet
  285.    client should then process data from the server as though it
  286.    were NVT ASCII data.
  287.  
  288.  
  289. J. Penner                Expires April 1994                   [Page 5]
  290.  
  291. TN3270 Enhancements Working Group                           Jon Penner
  292. draft-ietf-tn3270e-current-pract-02.txt                   October 1993
  293.  
  294.    The following examples show how a TN3270 client handles
  295.    the 3270-REGIME, SUPPRESS-GO-AHEAD, ECHO and TM commands.
  296.  
  297.    Very few servers support the 3270 Regime Telnet Option.
  298.    If the client does not support this option and responds negatively
  299.    as shown in the following example, the server will proceed on to
  300.    the more typical example shown above.
  301.  
  302.       Server:  IAC DO 3270-REGIME
  303.       Client:  IAC WONT 3270-REGIME
  304.        Normal negotiation:
  305.       Server:  IAC DO TERMINAL-TYPE
  306.          ...  (see above)
  307.  
  308.    The Suppress Go Ahead option [8] is requested by some servers. The
  309.    Suppress Go Ahead option RFC lists the default as being go aheads
  310.    are transmitted to signal the receiver to begin transmitting.
  311.    Since TN3270 negotiates binary and end-of-record and is a block
  312.    mode protocol, the telnet go ahead character is not sent.
  313.    Most servers do not negotiate this option even though they do not
  314.    use the telnet go ahead character.
  315.  
  316.       Server:  IAC DO SUPPRESS-GO-AHEAD
  317.       Client:  IAC WILL SUPPESS-GO-AHEAD
  318.  
  319.    The Echo option [9] is negotiated by those servers that make use
  320.    of the telnet NVT mode to allow the user to enter information
  321.    prior to negotiating the options necessary for TN3270.  This
  322.    information includes but is not limited to user identification,
  323.    password and destination 3270 host.  Some servers accept the
  324.    default for this option which is for the client to not do a local
  325.    echo of characters the user enters at the keyboard. This allows
  326.    the server to decide if it should echo characters back to the
  327.    client (or not in the case of password). Echoing characters back
  328.    to the client causes slow response time since every character is
  329.    typically echoed individually. Because of this, some servers
  330.    negotiate for the client to do it's own local echoing (except
  331.    for passwords). The following example illustrates this case.
  332.  
  333.       Server:  IAC DO ECHO
  334.       Client:  IAC WILL ECHO
  335.         (Client does local display of all characters)
  336.       Server:  IAC WONT ECHO
  337.       Client:  IAC DONT ECHO
  338.         (Client enters password - not locally displayed or remotely
  339.       echoed)
  340.       Server:  IAC DO ECHO
  341.       Client:  IAC WILL ECHO
  342.      (Client resumes local display of all characters)
  343.  
  344.    The Timing Mark option [10] is used by some servers to test for
  345.    the continued presence of an TN3270 client. The following example
  346.  
  347. J. Penner                Expires April 1994                   [Page 6]
  348.  
  349. TN3270 Enhancements Working Group                           Jon Penner
  350. draft-ietf-tn3270e-current-pract-02.txt                   October 1993
  351.  
  352.    will assure the server the client is still alive.
  353.  
  354.       Server:  IAC DO TIMING-MARK
  355.       Client:  IAC WONT TIMING-MARK
  356.  
  357.    The NOP character (hexadecimal F1) [11] is also used by some servers
  358.    to test for the continued presence of a TN3270 client. If a client
  359.    has terminated abnormally, TCP/IP send errors will occur with
  360.    this and the TIMING-MARK case, above.
  361.  
  362.       Server:  IAC NOP
  363.       Client:  <ignore / no response>
  364.  
  365.  
  366. Handling 3270 data
  367.  
  368.    The 3270 data stream consists of a command and its associated data.
  369.    Commands include but are not limited to erase screen, erase and write
  370.    to screen and read current screen; see [6] for a complete description
  371.    of 3270 commands and parameters.
  372.  
  373.    The reason for negotiating the EOR telnet option [4] is to provide a
  374.    method for separating these commands since no length information is
  375.    specified. 3270 commands are interpreted by the telnet client in
  376.    their entirety.  Each 3270 command and possible data is terminated
  377.    with the IAC EOR sequence.
  378.  
  379.    The Binary option [3] is also required since 3270 data may contain
  380.    the FF (hexadecimal) or IAC character. When this character is
  381.    encountered during a tn3270 connection it is handled as per the
  382.    Binary RFC [3].
  383.  
  384. 3270 Structured Fields
  385.  
  386.    3270 structured fields provide a much wider range of features than
  387.    "old-style" 3270 data, such as support for graphics, partitions and
  388.    IPDS printer datastreams. A structured field is a 3270 data type
  389.    that allows non 3270 data to be embedded within 3270 data. Briefly,
  390.    a structured field consists of the structured field command followed
  391.    by one or more data blocks. Each data block has a length and a
  392.    structured field identifier, followed optionally by additional data.
  393.  
  394.    Not every TN3270 client can be expected to support all structured
  395.    field functions.   There must be a  mechanism by which those clients
  396.    that are capable of supporting some or all structured field
  397.    functions can indicate their wishes. This is typically done by
  398.    adding "-E" to the end of the terminal type string. That is, when the
  399.    terminal identifies itself as being able to handle extended
  400.    attributes, it also is capable of being able to send and receive
  401.    structured fields.
  402.  
  403.    The design of 3270 structured fields provides a convenient means to
  404.  
  405. J. Penner                Expires April 1994                   [Page 7]
  406.  
  407. TN3270 Enhancements Working Group                           Jon Penner
  408. draft-ietf-tn3270e-current-pract-02.txt                   October 1993
  409.  
  410.    convey the level of support (including no support) for the various
  411.    structured field functions.  This mechanism is the Read Partition
  412.    Query command, which is sent from the host application to the
  413.    client.  The client responds with a Query Reply, listing which,
  414.    if any, structured field functions it supports.
  415.  
  416.    A TN3270 client that supports structured fields will
  417.    respond to a Read Partition Query command with the appropriate reply.
  418.    The sequence of events of when a client receives a Read Partition
  419.    Query and it does not support structured fields is left up to the
  420.    client implementation.  Typically clients can identify at least this
  421.    structured field and reply with a null set.
  422.  
  423.  
  424. Implementation Rules
  425.  
  426.    All commands and parameters are governed by their respective RFCs
  427.  
  428.  
  429. The 3270 ATTN (Attention) Key
  430.  
  431.    The 3270 ATTN key is interpreted by many host applications in an
  432.    SNA environment as an indication that the user wishes to interrupt
  433.    the execution of the current process.  A majority of the telnet
  434.    servers currently accept the telnet IAC BREAK (code 243) [11]
  435.    sequence to signal this event.
  436.  
  437.    Use of this key requires two things:
  438.  
  439.     - TN3270 clients should provide as part of their keyboard
  440.       mapping a single key or a combination of keys that map to
  441.       the 3270 ATTN key.  When the user presses this key(s), the
  442.       client should transmit a Telnet BREAK command to the server.
  443.  
  444.     - TN3270 servers should translate the BREAK command received from
  445.       a TN3270 client into the appropriate form and pass it along
  446.       to the host application as an ATTN key.  In other words, the
  447.       server representing an SLU in an SNA session should send
  448.       a SIGNAL RU to the host application.
  449.  
  450.    The ATTN key is not supported in a non-SNA environment; therefore,
  451.    a TN3270 server representing non-SNA 3270 devices should ignore
  452.    any Telnet BREAK commands it receives from a client.
  453.  
  454. The 3270 SYSREQ Key
  455.  
  456.    The 3270 SYSREQ key is useful in an environment where the
  457.    telnet server is attached to the host using SNA. The SYSREQ key
  458.    is useful in this environment when the host application becomes
  459.    locked and the user wishes to terminate the session without
  460.    closing the Telnet connection.
  461.  
  462.  
  463. J. Penner                Expires April 1994                   [Page 8]
  464.  
  465. TN3270 Enhancements Working Group                           Jon Penner
  466. draft-ietf-tn3270e-current-pract-02.txt                   October 1993
  467.  
  468.    The Telnet Interrupt Process (IP) command [11] is interpreted by some
  469.    telnet servers as a SYSREQ key. Other servers recognize the 3270
  470.    Test Request key as a SYSREQ key.  In an SNA environment, pressing
  471.    this key toggles the terminal between the host application session
  472.    and the network control program session.  Usually the user
  473.    will enter LOGOFF once this key has been pressed to terminate
  474.    the application session and then select a new host to connect to.
  475.    Sometimes, if SYSREQ is pressed again, the host application will
  476.    become unlocked and normal activities may then proceed.
  477.  
  478.    It is entirely up to the telnet server to interpret this command and
  479.    send the appropriate commands to the host as well as format the
  480.    resulting host data for display on the telnet client. The data
  481.    format during the network control program session is in a slightly
  482.    different format than normal 3270 data. Since the telnet server
  483.    has no way to pass this data directly to the telnet client, it must
  484.    either handle it entirely and ignore SYSREQ events or convert it to
  485.    3270  data to present to the client.  There is no restriction that
  486.    prevents the server from negotiating out of the TN3270 state to
  487.    NVT to present this data.
  488.  
  489.    In order to implement SYSREQ key support, TN3270
  490.    clients should  provide a key (or combination of keys) that is
  491.    identified as mapping to the 3270 SYSREQ key.  When the user presses
  492.    this key(s), the client should either transmit a Telnet IP command
  493.    or Test Request key to the server, depending on the server
  494.    implementation.
  495.  
  496.    TN3270 servers representing non-SNA 3270 terminals may ignore any
  497.    Telnet IP commands or Test Request keys they receive from a client.
  498.  
  499.  
  500. References
  501.  
  502. [1] Rekhter, J., "Telnet 3270 Regime Option", RFC 1041, IBM
  503.     Corporation, January 1988.
  504.  
  505. [2] VanBokkelen, J., "Telnet Terminal-Type Option", RFC 1091,
  506.     FTP Software, Inc., February 1989.
  507.  
  508. [3] Postel, J., and J. Reynolds, "Telnet Binary Transmission",
  509.     RFC 856, USC/Information Sciences Institute, May 1983.
  510.  
  511. [4] Postel, J., "Telnet End of Record Option", RFC 885, USC/
  512.     Information Sciences Institute, December 1983.
  513.  
  514. [5] Reynolds, J., and J. Postel, "Assigned Numbers", RFC 1340,
  515.     USC/Information Sciences Institute, July 1992.
  516.  
  517. [6] "3270 Information Display System - Data Stream Programmer's
  518.     Reference", publication number GA23-0059, IBM Corporation.
  519.  
  520.  
  521. J. Penner                Expires April 1994                   [Page 9]
  522.  
  523. TN3270 Enhancements Working Group                           Jon Penner
  524. draft-ietf-tn3270e-current-pract-02.txt                   October 1993
  525.  
  526. [7] "Systems Network Architecture - Formats",
  527.     publication number GA27-3136, IBM Corporation.
  528.  
  529. [8] Postel, J., and J. Reynolds, "Telnet Suppress Go Ahead Option",
  530.     RFC 858, USC/Information Sciences Institute, May 1983.
  531.  
  532. [9] Postel, J., and J. Reynolds, "Telnet Echo Option",
  533.     RFC 857, USC/Information Sciences Institute, May 1983.
  534.  
  535. [10] Postel, J., and J. Reynolds, "Telnet Timing Mark Option",
  536.     RFC 860, USC/Information Sciences Institute, May 1983.
  537.  
  538. [11] Postel, J., and J. Reynolds, "Telnet Protocol Specification",
  539.     RFC 854, USC/Information Sciences Institute, May 1983.
  540.  
  541.  
  542. Author's Note
  543.  
  544.    Portions of this document were drawn from the following sources:
  545.  
  546.     - A White Paper written by Owen Reddecliffe, WRQ Corporation,
  547.       October 1991.
  548.  
  549.     - Experimental work on the part of Cleve Graves and Michelle
  550.       Angel, OpenConnect Systems, 1992 - 1993.
  551.  
  552.     - Discussions at the March 1993 IETF meeting and TN3270 BOF at
  553.       Interop August 1993.
  554.  
  555.     - Discussions on the "TN3270E" list, 1993.
  556.  
  557.  
  558. Author's Address
  559.  
  560.    Jon Penner
  561.    DCA, Inc.
  562.    2800 Oakmont Drive
  563.    Austin, TX 78664
  564.  
  565.    Phone: (512) 244-3871
  566.  
  567.    Email: jjp@bscs.uucp
  568.  
  569.  
  570.  
  571.  
  572.  
  573.  
  574.  
  575.  
  576.  
  577.  
  578.  
  579. J. Penner                Expires April 1994                   [Page 10]
  580.  
  581.